import { login, checkEmail, register } from '@/api/userCenter'
import {
  clearStorage
} from '@/utils'

const state = {}
const getters = {}
const mutations = {
  // 清空登录信息
  clearAccountInfo() {
    clearStorage()
  }
}
const actions = {
  postLogin: (params) => login(params),
  getCheckEmail: (params) => checkEmail(params),
  postRegister: (params) => register(params)
}

export default {
  namespaced: true,
  state,
  getters,
  mutations,
  actions
}